// TypeScript file
class startView extends egret.DisplayObjectContainer {
    public constructor() {
        super();
        this.width = 750;
        this.height = 1334;
        this.init();
    }

    private image: egret.Bitmap;

    private init() {
       this.test();
       this.onAddToStage();
    }

    //测试
    private test() {
        var bg = new egret.Bitmap();
        bg.texture = RES.getRes("test_font_png");
        bg.scaleX = bg.scaleY = 3;
        bg.x = 100;
        bg.y = 600;
        this.addChild(bg);
    }
    private onAddToStage() {
        RES.getResByUrl( "resource/assets/test_font.fnt", this.onLoadComplete, this, RES.ResourceItem.TYPE_FONT );
    }
    private _bitmapText:egret.BitmapText;
    private onLoadComplete( font:egret.BitmapFont ):void {
        this._bitmapText = new egret.BitmapText();
        this._bitmapText.font = font;
        this._bitmapText.text = "1e2g3H";
        this._bitmapText.letterSpacing = 5;
        this._bitmapText.x = 50;
        this._bitmapText.y = 300;
        this.addChild( this._bitmapText );
    }

}